﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TagThisOrgProject.Models.ViewModel
{
    public class UserBookmarkViewModel
    {
        public string Url { get; set; }
        public List<string> Tags { get; set; }
        public string Title { get; set; }
        public bool isPrivate { get; set; }
    }


    public class UrlViewModel
    {
        public string Url;
        public string Favicon;
        public string ImageUrl;
        public string GeneralTitle;
        public string Description;
        public TagViewModel[] Tags;

        public UrlViewModel(string url, string favicon, string imageUrl, string generalTitle, string description, params TagViewModel[] tags)
        {
            Url = url;
            Favicon = favicon;
            ImageUrl = imageUrl;
            GeneralTitle = generalTitle;
            Description = description;
            Tags = tags;
        }
    }
    public struct TagViewModel
    {
        public long Id;
        public string Text;
        public TagViewModel(long id, string text)
        {
            Id = id;
            Text = text;
        }
    }

    public class UrlPageViewModel
    {
        public List<UrlViewModel> urls = new List<UrlViewModel>();
        public int current_page = 0;
        public Int64 result_count = 0;
        public byte result_per_page = 10;
        public UrlPageViewModel(IEnumerable<UrlViewModel> urls, int currentPage, Int64 allResultCount, byte resultPerPage = 10)
        {
            this.urls.AddRange(urls);
            this.current_page = currentPage;
            this.result_count = allResultCount;
            this.result_per_page = resultPerPage;
        }
    }
}